package com.dingding.order.dto.orderlist;

import java.util.Comparator;

/**
 * @description:对(订单起始地至当前位置距离)进行排序
 * @author yi
 *
 */
public class ComparatorUtil implements Comparator<NearbyOrderList>{

	@Override
	public int compare(NearbyOrderList resGetNearbyUserList, NearbyOrderList resGetNearbyUserList2) {
		if(resGetNearbyUserList.getStartDistance().compareTo(resGetNearbyUserList2.getStartDistance()) < 0){
			return -1;
		}else if(resGetNearbyUserList.getStartDistance() == resGetNearbyUserList2.getStartDistance()){
			return 0;
		}else{
			return 1;
		}
	
	}





}
